/*var app = {
    // Application Constructor
    initialize: function() {
        this.bindEvents();
    },
    // Bind Event Listeners
    //
    // Bind any events that are required on startup. Common events are:
    // 'load', 'deviceready', 'offline', and 'online'.
    bindEvents: function() {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },
    // deviceready Event Handler
    //
    // The scope of 'this' is the event. In order to call the 'receivedEvent'
    // function, we must explicitly call 'app.receivedEvent(...);'
    onDeviceReady: function() {
        console.debug("onDeviceReady");
    }
};

app.initialize();*/

appModule = angular.module("app", ['ionic', 'ngAnimate', 'ngSanitize', 'ui.router'])
    .config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
        $urlRouterProvider.otherwise("/");
        $stateProvider
            .state('index', {
                url: '/',
                controller: function() {
                    alert("index.html");
                },
                views: {
                    'terminals': {
                        templateUrl: 'terminals.html',
                        controller: 'TerminalsController'
                    },
                    'sessionConfigEdit': {
                        templateUrl: 'session-config/edit.html'
                    },
                    'sessionConfigManager': {
                        templateUrl: 'session-config/manager.html',
                        controller: 'sessionConfigManagerController'
                    }
                }
            });
    }]);
